Origin: https://github.com/LibRaw/LibRaw/commit/
75ed2c12a35b765b3b6ad695cc1f044f19efe644
Bug: https://talosintelligence.com/vulnerability_reports/TALOS-2026-2331
Bug-Debian: https://bugs.debian.org/
1133845
Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2026-21413
Gbp-Pq: Name CVE-2026-21413.patch
if (jh.clrs == 4 && jwide >= raw_width * 2)
jhigh *= 2;
+
try
{
for (jrow = 0; jrow < jh.high; jrow++)
col += (row--, raw_width);
if (row > raw_height)
throw LIBRAW_EXCEPTION_IO_CORRUPT;
- if ((unsigned)row < raw_height)
+ if (((unsigned)row < raw_height) && ((unsigned)col < raw_width))
RAW(row, col) = val;
if (++col >= raw_width)
col = (row++, 0);